home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Finder Dungeon / source code / MoreFiles 1.4.6 / C Headers / MoreFiles.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-28  |  42.0 KB  |  1,240 lines  |  [TEXT/MPS ]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    The long lost high-level and FSSpec File Manager functions.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support Emeritus
  7. **
  8. **    File:        MoreFiles.h
  9. **
  10. **    Copyright © 1992-1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILES__
  23. #define __MOREFILES__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. #include "Optimization.h"
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /*****************************************************************************/
  35.  
  36. pascal    OSErr    HGetVolParms(ConstStr255Param volName,
  37.                              short vRefNum,
  38.                              GetVolParmsInfoBuffer *volParmsInfo,
  39.                              long *infoSize);
  40. /*    ¶ Determine the characteristics of a volume.
  41.     The HGetVolParms function returns information about the characteristics
  42.     of a volume. A result of paramErr usually just means the volume doesn't
  43.     support PBHGetVolParms and the feature you were going to check
  44.     for isn't available.
  45.  
  46.     volName            input:    A pointer to the name of a mounted volume
  47.                             or nil.
  48.     vRefNum            input:    Volume specification.
  49.     volParmsInfo    input:    Pointer to GetVolParmsInfoBuffer where the
  50.                             volume attributes information is returned.
  51.                     output:    Atributes information.
  52.     infoSize        input:    Size of buffer pointed to by volParmsInfo.
  53.                     output: Size of data actually returned.
  54.     
  55.     Result Codes
  56.         noErr                0        No error
  57.         nsvErr                -35        Volume not found
  58.         paramErr            -50        Volume doesn't support this function
  59.     
  60.     __________
  61.     
  62.     Also see the macros for checking attribute bits in MoreFilesExtras.h
  63. */
  64.  
  65. /*****************************************************************************/
  66.  
  67. pascal    OSErr    HCreateMinimum(short vRefNum,
  68.                                long dirID,
  69.                                ConstStr255Param fileName);
  70. /*    ¶ Create a new file with no creator or file type.
  71.     The HCreateMinimum function creates a new file without attempting to set
  72.     the creator and file type of the new file.  This function is needed to
  73.     create a file in an AppleShare "drop box" where the user can make
  74.     changes, but cannot see folder or files.
  75.     
  76.     vRefNum        input:    Volume specification.
  77.     dirID        input:    Directory ID.
  78.     fileName    input:    The name of the new file.
  79.     
  80.     Result Codes
  81.         noErr                0        No error
  82.         dirFulErr            -33        File directory full
  83.         dskFulErr            -34        Disk is full
  84.         nsvErr                -35        No such volume
  85.         ioErr                -36        I/O error
  86.         bdNamErr            -37        Bad filename
  87.         fnfErr                -43        Directory not found or incomplete pathname
  88.         wPrErr                -44        Hardware volume lock
  89.         vLckdErr            -46        Software volume lock
  90.         dupFNErr            -48        Duplicate filename and version
  91.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  92.         afpAccessDenied        -5000    User does not have the correct access
  93.         afpObjectTypeErr    -5025    A directory exists with that name
  94.     
  95.     __________
  96.     
  97.     Also see:    FSpCreateMinimum
  98. */
  99.  
  100. /*****************************************************************************/
  101.  
  102. pascal    OSErr    FSpCreateMinimum(const FSSpec *spec);
  103. /*    ¶ Create a new file with no creator or file type.
  104.     The FSpCreateMinimum function creates a new file without attempting to set 
  105.     the the creator and file type of the new file.  This function is needed to
  106.     create a file in an AppleShare "dropbox" where the user can make
  107.     changes, but cannot see folder or files. 
  108.     
  109.     spec        input:    An FSSpec record specifying the file to create.
  110.     
  111.     Result Codes
  112.         noErr                0        No error
  113.         dirFulErr            -33        File directory full
  114.         dskFulErr            -34        Disk is full
  115.         nsvErr                -35        No such volume
  116.         ioErr                -36        I/O error
  117.         bdNamErr            -37        Bad filename
  118.         fnfErr                -43        Directory not found or incomplete pathname
  119.         wPrErr                -44        Hardware volume lock
  120.         vLckdErr            -46        Software volume lock
  121.         dupFNErr            -48        Duplicate filename and version
  122.         dirNFErrdirNFErr    -120    Directory not found or incomplete pathname
  123.         afpAccessDenied        -5000    User does not have the correct access
  124.         afpObjectTypeErr    -5025    A directory exists with that name
  125.     
  126.     __________
  127.     
  128.     Also see:    HCreateMinimum
  129. */
  130.  
  131. /*****************************************************************************/
  132.  
  133. pascal    OSErr    ExchangeFiles(short vRefNum,
  134.                               long srcDirID,
  135.                               ConstStr255Param srcName,
  136.                               long dstDirID,
  137.                               ConstStr255Param dstName);
  138. /*    ¶ Exchange the data stored in two files on the same volume.
  139.     The ExchangeFiles function swaps the data in two files on the same
  140.     volume by changing some of the information in the volume catalog and,
  141.     if the files are open, in the file control blocks.
  142.  
  143.     vRefNum        input:    Volume specification.
  144.     srcDirID    input:    Source directory ID.
  145.     srcName        input:    Source file name.
  146.     dstDirID    input:    Destination directory ID.
  147.     dstName        input:    Destination file name.
  148.     
  149.     Result Codes
  150.         noErr                0        No error
  151.         nsvErr                -35        Volume not found
  152.         ioErr                -36        I/O error
  153.         fnfErr                -43        File not found
  154.         fLckdErr            -45        File is locked
  155.         vLckdErr            -46        Volume is locked or read-only
  156.         paramErr            -50        Function not supported by volume
  157.         volOfflinErr        -53        Volume is offline
  158.         wrgVolTypErr        -123    Not an HFS volume
  159.         diffVolErr            -1303    Files on different volumes
  160.         afpAccessDenied        -5000    User does not have the correct access
  161.         afpObjectTypeErr    -5025    Object is a directory, not a file
  162.         afpSameObjectErr    -5038    Source and destination are the same
  163.  
  164.     __________
  165.     
  166.     Also see:    FSpExchangeFilesCompat
  167. */
  168.  
  169. /*****************************************************************************/
  170.  
  171. pascal    OSErr    ResolveFileIDRef(ConstStr255Param volName,
  172.                                  short vRefNum,
  173.                                  long fileID,
  174.                                  long *parID,
  175.                                  StringPtr fileName);
  176. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  177.     The ResolveFileIDRef function returns the filename and parent directory ID
  178.     of the file with the specified file ID reference.
  179.     
  180.     volName    input:    A pointer to the name of a mounted volume
  181.                     or nil.
  182.     vRefNum    input:    Volume specification.
  183.     fileID    input:    The file ID reference.
  184.     parID    output:    The parent directory ID of the file.
  185.     name    input:    Points to a buffer (minimum Str63) where the filename
  186.                     is to be returned or must be nil.
  187.             output:    The filename.
  188.     
  189.     Result Codes
  190.         noErr                0        No error
  191.         nsvErr                -35        Volume not found
  192.         ioErr                -36        I/O error
  193.         fnfErr                -43        File not found
  194.         paramErr            -50        Function not supported by volume
  195.         volOfflinErr        -53        Volume is offline
  196.         extFSErr            -58        External file system error - no file
  197.                                     system claimed this call.
  198.         wrgVolTypErr        -123    Not an HFS volume
  199.         fidNotFoundErr        -1300    File ID reference not found
  200.         notAFileErr            -1302    Specified file is a directory
  201.         afpAccessDenied        -5000    User does not have the correct access
  202.         afpObjectTypeErr    -5025    Specified file is a directory
  203.         afpIDNotFound        -5034    File ID reference not found
  204.         afpBadIDErr            -5039    File ID reference not found
  205.     
  206.     __________
  207.     
  208.     Also see:    FSpResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  209.                 DeleteFileIDRef
  210. */
  211.  
  212. /*****************************************************************************/
  213.  
  214. pascal    OSErr    FSpResolveFileIDRef(ConstStr255Param volName,
  215.                                     short vRefNum,
  216.                                     long fileID,
  217.                                     FSSpecPtr spec);
  218. /*    ¶ Retrieve the location of the file with the specified file ID reference.
  219.     The FSpResolveFileIDRef function fills in an FSSpec with the location
  220.     of the file with the specified file ID reference.
  221.     
  222.     volName    input:    A pointer to the name of a mounted volume
  223.                     or nil.
  224.     vRefNum    input:    Volume specification.
  225.     fileID    input:    The file ID reference.
  226.     spec    input:    A pointer to a FSSpec record.
  227.             output:    A file system specification to be filled in by
  228.                     FSpResolveFileIDRef.
  229.     
  230.     Result Codes
  231.         noErr                0        No error
  232.         nsvErr                -35        Volume not found
  233.         ioErr                -36        I/O error
  234.         fnfErr                -43        File not found
  235.         paramErr            -50        Function not supported by volume or
  236.                                     no default volume
  237.         volOfflinErr        -53        Volume is offline
  238.         extFSErr            -58        External file system error - no file
  239.                                     system claimed this call.
  240.         wrgVolTypErr        -123    Not an HFS volume
  241.         fidNotFoundErr        -1300    File ID reference not found
  242.         notAFileErr            -1302    Specified file is a directory
  243.         afpAccessDenied        -5000    User does not have the correct access
  244.         afpObjectTypeErr    -5025    Specified file is a directory
  245.         afpIDNotFound        -5034    File ID reference not found
  246.         afpBadIDErr            -5039    File ID reference not found
  247.     
  248.     __________
  249.     
  250.     Also see:    ResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef,
  251.                 DeleteFileIDRef
  252. */
  253.  
  254. /*****************************************************************************/
  255.  
  256. pascal    OSErr    CreateFileIDRef(short vRefNum,
  257.                                 long parID,
  258.                                 ConstStr255Param fileName,
  259.                                 long *fileID);
  260. /*    ¶ Establish a file ID reference for a file.
  261.     The CreateFileIDRef function creates a file ID reference for the
  262.     specified file, or if a file ID reference already exists, supplies
  263.     the file ID reference and returns the result code fidExists.
  264.  
  265.     vRefNum        input:    Volume specification.
  266.     parID        input:    Directory ID.
  267.     fileName    input:    The name of the file.
  268.     fileID        output:    The file ID reference.
  269.     
  270.     Result Codes
  271.         noErr                0        No error
  272.         nsvErr                -35        Volume not found
  273.         ioErr                -36        I/O error
  274.         fnfErr                -43        File not found
  275.         wPrErr                -44        Hardware volume lock
  276.         vLckdErr            -46        Software volume lock
  277.         paramErr            -50        Function not supported by volume
  278.         volOfflinErr        -53        Volume is offline
  279.         extFSErr            -58        External file system error - no file
  280.                                     system claimed this call.
  281.         wrgVolTypErr        -123    Not an HFS volume
  282.         fidExists            -1301    File ID reference already exists
  283.         notAFileErrn        -1302    Specified file is a directory
  284.         afpAccessDenied        -5000    User does not have the correct access
  285.         afpObjectTypeErr    -5025    Specified file is a directory
  286.         afpIDExists            -5035    File ID reference already exists
  287.     
  288.     __________
  289.     
  290.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, FSpCreateFileIDRef,
  291.                 DeleteFileIDRef
  292. */
  293.  
  294. /*****************************************************************************/
  295.  
  296. pascal    OSErr    FSpCreateFileIDRef(const FSSpec *spec,
  297.                                    long *fileID);
  298. /*    ¶ Establish a file ID reference for a file.
  299.     The FSpCreateFileIDRef function creates a file ID reference for the
  300.     specified file, or if a file ID reference already exists, supplies
  301.     the file ID reference and returns the result code fidExists.
  302.  
  303.     spec        input:    An FSSpec record specifying the file.
  304.     fileID        output:    The file ID reference.
  305.     
  306.     Result Codes
  307.         noErr                0        No error
  308.         nsvErr                -35        Volume not found
  309.         ioErr                -36        I/O error
  310.         fnfErr                -43        File not found
  311.         wPrErr                -44        Hardware volume lock
  312.         vLckdErr            -46        Software volume lock
  313.         paramErr            -50        Function not supported by volume
  314.         volOfflinErr        -53        Volume is offline
  315.         extFSErr            -58        External file system error - no file
  316.                                     system claimed this call.
  317.         wrgVolTypErr        -123    Not an HFS volume
  318.         fidExists            -1301    File ID reference already exists
  319.         notAFileErrn        -1302    Specified file is a directory
  320.         afpAccessDenied        -5000    User does not have the correct access
  321.         afpObjectTypeErr    -5025    Specified file is a directory
  322.         afpIDExists            -5035    File ID reference already exists
  323.     
  324.     __________
  325.     
  326.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  327.                 DeleteFileIDRef
  328. */
  329.  
  330. /*****************************************************************************/
  331.  
  332. pascal    OSErr    DeleteFileIDRef(ConstStr255Param volName,
  333.                                 short vRefNum,
  334.                                 long fileID);
  335. /*    ¶ Delete a file ID reference.
  336.     The DeleteFileIDRef function deletes a file ID reference.
  337.  
  338.     volName    input:    A pointer to the name of a mounted volume
  339.                     or nil.
  340.     vRefNum    input:    Volume specification.
  341.     fileID    input:    The file ID reference.
  342.     
  343.     Result Codes
  344.         noErr                0        No error
  345.         nsvErr                -35        Volume not found
  346.         ioErr                -36        I/O error
  347.         fnfErr                -43        File not found
  348.         wPrErr                -44        Hardware volume lock
  349.         vLckdErr            -46        Software volume lock
  350.         paramErr            -50        Function not supported by volume
  351.         volOfflinErr        -53        Volume is offline
  352.         extFSErr            -58        External file system error - no file
  353.                                     system claimed this call.
  354.         wrgVolTypErr        -123    Function is not supported by volume
  355.         fidNotFoundErr        -1300    File ID reference not found
  356.         afpAccessDenied        -5000    User does not have the correct access
  357.         afpObjectTypeErr    -5025    Specified file is a directory
  358.         afpIDNotFound        -5034    File ID reference not found
  359.     
  360.     __________
  361.     
  362.     Also see:    FSpResolveFileIDRef, ResolveFileIDRef, CreateFileIDRef,
  363.                 FSpCreateFileIDRef
  364. */
  365.  
  366. /*****************************************************************************/
  367.  
  368. pascal    OSErr    FlushFile(short refNum);
  369. /*    ¶ Write the contents of a file's access path buffer (the fork data).
  370.     The FlushFile function writes the contents of a file's access path
  371.     buffer (the fork data) to the volume. Note: some of the file's catalog
  372.     information stored on the volume may not be correct until FlushVol
  373.     is called.
  374.  
  375.     refNum    input:    The file reference number of an open file.
  376.     
  377.     Result Codes
  378.         noErr                0        No error
  379.         nsvErr                -35        Volume not found
  380.         ioErr                 -36        I/O error
  381.         fnOpnErr            -38        File not open
  382.         fnfErr                -43        File not found
  383.         rfNumErr            -51        Bad reference number
  384.         extFSErr            -58        External file system error - no file
  385.                                     system claimed this call.
  386. */
  387.  
  388. /*****************************************************************************/
  389.  
  390. pascal    OSErr    LockRange(short refNum,
  391.                           long rangeLength,
  392.                           long rangeStart);
  393. /*    ¶ Lock a portion of a file.
  394.     The LockRange function locks (denies access to) a portion of a file
  395.     that was opened with shared read/write permission.
  396.  
  397.     refNum        input:    The file reference number of an open file.
  398.     rangeLength    input:    The number of bytes in the range.
  399.     rangeStart    input:    The starting byte in the range to lock.
  400.     
  401.     Result Codes
  402.         noErr                0        No error
  403.         ioErr                -36        I/O error
  404.         fnOpnErr            -38        File not open
  405.         eofErr                -39        Logical end-of-file reached
  406.         fLckdErr            -45        File is locked by another user
  407.         paramErr            -50        Negative ioReqCount
  408.         rfNumErr            -51        Bad reference number
  409.         extFSErr            -58        External file system error - no file
  410.                                     system claimed this call.
  411.         volGoneErr            -124    Server volume has been disconnected
  412.         afpNoMoreLocks        -5015    No more ranges can be locked
  413.         afpRangeOverlap        -5021    Part of range is already locked
  414.  
  415.     __________
  416.     
  417.     Also see:    UnlockRange
  418. */
  419.  
  420. /*****************************************************************************/
  421.  
  422. pascal    OSErr    UnlockRange(short refNum,
  423.                             long rangeLength,
  424.                             long rangeStart);
  425. /*    ¶ Unlock a previously locked range.
  426.     The UnlockRange function unlocks (allows access to) a previously locked
  427.     portion of a file that was opened with shared read/write permission.
  428.  
  429.     refNum        input:    The file reference number of an open file.
  430.     rangeLength    input:    The number of bytes in the range.
  431.     rangeStart    input:    The starting byte in the range to unlock.
  432.     
  433.     Result Codes
  434.         noErr                0        No error
  435.         ioErr                -36        I/O error
  436.         fnOpnErr            -38        File not open
  437.         eofErr                -39        Logical end-of-file reached
  438.         paramErr            -50        Negative ioReqCount
  439.         rfNumErr            -51        Bad reference number
  440.         extFSErr            -58        External file system error - no file
  441.                                     system claimed this call.
  442.         volGoneErr            -124    Server volume has been disconnected
  443.         afpRangeNotLocked    -5020    Specified range was not locked
  444.  
  445.     __________
  446.     
  447.     Also see:    LockRange
  448. */
  449.  
  450. /*****************************************************************************/
  451.  
  452. pascal    OSErr    GetForeignPrivs(short vRefNum,
  453.                                 long dirID,
  454.                                 ConstStr255Param name,
  455.                                 void *foreignPrivBuffer,
  456.                                 long *foreignPrivSize,
  457.                                 long *foreignPrivInfo1,
  458.                                 long *foreignPrivInfo2,
  459.                                 long *foreignPrivInfo3,
  460.                                 long *foreignPrivInfo4);
  461. /*    ¶ Retrieve the native access-control information.
  462.     The GetForeignPrivs function retrieves the native access-control
  463.     information for a file or directory stored on a volume managed by
  464.     a foreign file system.
  465.     
  466.     vRefNum                input:    Volume specification.
  467.     dirID                input:    Directory ID.
  468.     name                input:    Pointer to object name, or nil when dirID
  469.                                 specifies a directory that's the object.
  470.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  471.                                 information is returned.
  472.                         output:    Privilege information.
  473.     foreignPrivSize        input:    Size of buffer pointed to by
  474.                                 foreignPrivBuffer.
  475.                         output: Amount of buffer actually used.
  476.     foreignPrivInfo1    output:    Information specific to privilege model.
  477.     foreignPrivInfo2    output:    Information specific to privilege model.
  478.     foreignPrivInfo3    output:    Information specific to privilege model.
  479.     foreignPrivInfo4    output:    Information specific to privilege model.
  480.     
  481.     Result Codes
  482.         noErr                0        No error
  483.         nsvErr                -35        Volume not found
  484.         paramErr            -50        Volume is HFS or MFS (that is, it has
  485.                                     no foreign privilege model), or foreign
  486.                                     volume does not support these calls
  487.     
  488.     __________
  489.     
  490.     Also see:    FSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  491. */
  492.  
  493. /*****************************************************************************/
  494.  
  495. pascal    OSErr    FSpGetForeignPrivs(const FSSpec *spec,
  496.                                    void *foreignPrivBuffer,
  497.                                    long *foreignPrivSize,
  498.                                    long *foreignPrivInfo1,
  499.                                    long *foreignPrivInfo2,
  500.                                    long *foreignPrivInfo3,
  501.                                    long *foreignPrivInfo4);
  502. /*    ¶ Retrieve the native access-control information.
  503.     The FSpGetForeignPrivs function retrieves the native access-control
  504.     information for a file or directory stored on a volume managed by
  505.     a foreign file system.
  506.     
  507.     spec                input:    An FSSpec record specifying the object.
  508.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  509.                                 information is returned.
  510.                         output:    Privilege information.
  511.     foreignPrivSize        input:    Size of buffer pointed to by
  512.                                 foreignPrivBuffer.
  513.                         output: Amount of buffer actually used.
  514.     foreignPrivInfo1    output:    Information specific to privilege model.
  515.     foreignPrivInfo2    output:    Information specific to privilege model.
  516.     foreignPrivInfo3    output:    Information specific to privilege model.
  517.     foreignPrivInfo4    output:    Information specific to privilege model.
  518.     
  519.     Result Codes
  520.         noErr                0        No error
  521.         nsvErr                -35        Volume not found
  522.         paramErr            -50        Volume is HFS or MFS (that is, it has
  523.                                     no foreign privilege model), or foreign
  524.                                     volume does not support these calls
  525.     
  526.     __________
  527.     
  528.     Also see:    GetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  529. */
  530.  
  531. /*****************************************************************************/
  532.  
  533. pascal    OSErr    SetForeignPrivs(short vRefNum,
  534.                                 long dirID,
  535.                                 ConstStr255Param name,
  536.                                 const void *foreignPrivBuffer,
  537.                                 long *foreignPrivSize,
  538.                                 long foreignPrivInfo1,
  539.                                 long foreignPrivInfo2,
  540.                                 long foreignPrivInfo3,
  541.                                 long foreignPrivInfo4);
  542. /*    ¶ Change the native access-control information.
  543.     The SetForeignPrivs function changes the native access-control
  544.     information for a file or directory stored on a volume managed by
  545.     a foreign file system.
  546.     
  547.     vRefNum                input:    Volume specification.
  548.     dirID                input:    Directory ID.
  549.     name                input:    Pointer to object name, or nil when dirID
  550.                                 specifies a directory that's the object.
  551.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  552.     foreignPrivSize        input:    Size of buffer pointed to by
  553.                                 foreignPrivBuffer.
  554.                         output: Amount of buffer actually used.
  555.     foreignPrivInfo1    input:    Information specific to privilege model.
  556.     foreignPrivInfo2    input:    Information specific to privilege model.
  557.     foreignPrivInfo3    input:    Information specific to privilege model.
  558.     foreignPrivInfo4    input:    Information specific to privilege model.
  559.     
  560.     Result Codes
  561.         noErr                0        No error
  562.         nsvErr                -35        Volume not found
  563.         paramErr            -50        Volume is HFS or MFS (that is, it has
  564.                                     no foreign privilege model), or foreign
  565.                                     volume does not support these calls
  566.     
  567.     __________
  568.     
  569.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs
  570. */
  571.  
  572. /*****************************************************************************/
  573.  
  574. pascal    OSErr    FSpSetForeignPrivs(const FSSpec *spec,
  575.                                    const void *foreignPrivBuffer,
  576.                                    long *foreignPrivSize,
  577.                                    long foreignPrivInfo1,
  578.                                    long foreignPrivInfo2,
  579.                                    long foreignPrivInfo3,
  580.                                    long foreignPrivInfo4);
  581. /*    ¶ Change the native access-control information.
  582.     The FSpSetForeignPrivs function changes the native access-control
  583.     information for a file or directory stored on a volume managed by
  584.     a foreign file system.
  585.     
  586.     spec                input:    An FSSpec record specifying the object.
  587.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  588.     foreignPrivSize        input:    Size of buffer pointed to by
  589.                                 foreignPrivBuffer.
  590.                         output: Amount of buffer actually used.
  591.     foreignPrivInfo1    input:    Information specific to privilege model.
  592.     foreignPrivInfo2    input:    Information specific to privilege model.
  593.     foreignPrivInfo3    input:    Information specific to privilege model.
  594.     foreignPrivInfo4    input:    Information specific to privilege model.
  595.     
  596.     Result Codes
  597.         noErr                0        No error
  598.         nsvErr                -35        Volume not found
  599.         paramErr            -50        Volume is HFS or MFS (that is, it has
  600.                                     no foreign privilege model), or foreign
  601.                                     volume does not support these calls
  602.     
  603.     __________
  604.     
  605.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs
  606. */
  607.  
  608. /*****************************************************************************/
  609.  
  610. pascal    OSErr    HGetLogInInfo(ConstStr255Param volName,
  611.                               short vRefNum,
  612.                               short *loginMethod,
  613.                               StringPtr userName);
  614. /*    ¶ Get the login method and user name used to log on to a shared volume.
  615.     The HGetLogInInfo function retrieves the login method and user name
  616.     used to log on to a particular shared volume.
  617.     
  618.     volName        input:    A pointer to the name of a mounted volume
  619.                         or nil.
  620.     vRefNum        input:    The volume reference number.
  621.     loginMethod    output:    The login method used (kNoUserAuthentication,
  622.                         kPassword, kEncryptPassword, or
  623.                         kTwoWayEncryptPassword).
  624.     userName    input:    Points to a buffer (minimum Str31) where the user
  625.                         name is to be returned or must be nil.
  626.                 output:    The user name.
  627.     
  628.     Result Codes
  629.         noErr                0        No error
  630.         nsvErr                -35        Specified volume doesn’t exist
  631.         paramErr            -50        Function not supported by volume
  632.     
  633.     __________
  634.     
  635.     Also see:    HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  636.                 FSpSetDirAccess, HMapName, HMapID
  637. */
  638.  
  639. /*****************************************************************************/
  640.  
  641. pascal    OSErr    HGetDirAccess(short vRefNum,
  642.                               long dirID,
  643.                               ConstStr255Param name,
  644.                               long *ownerID,
  645.                               long *groupID,
  646.                               long *accessRights);
  647. /*    ¶ Get a directory's access control information on a shared volume.
  648.     The HGetDirAccess function retrieves the directory access control
  649.     information for a directory on a shared volume.
  650.     
  651.     vRefNum            input:    Volume specification.
  652.     dirID            input:    Directory ID.
  653.     name            input:    Pointer to directory name, or nil if dirID
  654.                             specifies the directory.
  655.     ownerID            output:    The directory's owner ID.
  656.     groupID            output:    The directory's group ID or
  657.                             0 if no group affiliation.
  658.     accessRights    output:    The directory's access rights.
  659.     
  660.     Result Codes
  661.         noErr                0        No error
  662.         fnfErr                -43        Directory not found
  663.         paramErr            -50        Function not supported by volume
  664.         afpAccessDenied        -5000    User does not have the correct access
  665.                                     to the directory
  666.     
  667.     __________
  668.     
  669.     Also see:    HGetLogInInfo, FSpGetDirAccess, HSetDirAccess,
  670.                 FSpSetDirAccess, HMapName, HMapID
  671. */
  672.  
  673. /*****************************************************************************/
  674.  
  675. pascal    OSErr    FSpGetDirAccess(const FSSpec *spec,
  676.                                 long *ownerID,
  677.                                 long *groupID,
  678.                                 long *accessRights);
  679. /*    ¶ Get a directory's access control information on a shared volume.
  680.     The FSpGetDirAccess function retrieves the directory access control
  681.     information for a directory on a shared volume.
  682.     
  683.     spec            input:    An FSSpec record specifying the directory.
  684.     ownerID            output:    The directory's owner ID.
  685.     groupID            output:    The directory's group ID or
  686.                             0 if no group affiliation.
  687.     accessRights    output:    The directory's access rights.
  688.     
  689.     Result Codes
  690.         noErr                0        No error
  691.         fnfErr                -43        Directory not found
  692.         paramErr            -50        Function not supported by volume
  693.         afpAccessDenied        -5000    User does not have the correct access
  694.                                     to the directory
  695.     
  696.     __________
  697.     
  698.     Also see:    HGetLogInInfo, HGetDirAccess, HSetDirAccess,
  699.                 FSpSetDirAccess, HMapName, HMapID
  700. */
  701.  
  702. /*****************************************************************************/
  703.  
  704. pascal    OSErr    HSetDirAccess(short vRefNum,
  705.                               long dirID,
  706.                               ConstStr255Param name,
  707.                               long ownerID,
  708.                               long groupID,
  709.                               long accessRights);
  710. /*    ¶ Set a directory's access control information on a shared volume.
  711.     The HSetDirAccess function changes the directory access control
  712.     information for a directory on a shared volume. You must own a directory
  713.     to change its access control information.
  714.     
  715.     vRefNum            input:    Volume specification.
  716.     dirID            input:    Directory ID.
  717.     name            input:    Pointer to directory name, or nil if dirID
  718.                             specifies the directory.
  719.     ownerID            input:    The directory's owner ID.
  720.     groupID            input:    The directory's group ID or
  721.                             0 if no group affiliation.
  722.     accessRights    input:    The directory's access rights.
  723.     
  724.     Result Codes
  725.         noErr                0        No error
  726.         fnfErr                -43        Directory not found
  727.         vLckdErr            -46        Volume is locked or read-only
  728.         paramErr            -50        Parameter error
  729.         afpAccessDenied        -5000    User does not have the correct access
  730.                                     to the directory
  731.         afpObjectTypeErr    -5025    Object is a file, not a directory
  732.     
  733.     __________
  734.     
  735.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess,
  736.                 FSpSetDirAccess, HMapName, HMapID
  737. */
  738.  
  739. /*****************************************************************************/
  740.  
  741. pascal    OSErr    FSpSetDirAccess(const FSSpec *spec,
  742.                                 long ownerID,
  743.                                 long groupID,
  744.                                 long accessRights);
  745. /*    ¶ Set a directory's access control information on a shared volume.
  746.     The FSpSetDirAccess function changes the directory access control
  747.     information for a directory on a shared volume. You must own a directory
  748.     to change its access control information.
  749.     
  750.     spec            input:    An FSSpec record specifying the directory.
  751.     ownerID            input:    The directory's owner ID.
  752.     groupID            input:    The directory's group ID or
  753.                             0 if no group affiliation.
  754.     accessRights    input:    The directory's access rights.
  755.     
  756.     Result Codes
  757.         noErr                0        No error
  758.         fnfErr                -43        Directory not found
  759.         vLckdErr            -46        Volume is locked or read-only
  760.         paramErr            -50        Parameter error
  761.         afpAccessDenied        -5000    User does not have the correct access
  762.                                     to the directory
  763.         afpObjectTypeErr    -5025    Object is a file, not a directory
  764.     
  765.     __________
  766.     
  767.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  768.                 HMapName, HMapID
  769. */
  770.  
  771. /*****************************************************************************/
  772.  
  773. pascal    OSErr    HMapID(ConstStr255Param volName,
  774.                        short vRefNum,
  775.                        long ugID,
  776.                        short objType,
  777.                        StringPtr name);
  778. /*    ¶ Map a user or group ID to a user or group name.
  779.     The HMapID function determines the name of a user or group if you know
  780.     the user or group ID.
  781.     
  782.     volName        input:    A pointer to the name of a mounted volume
  783.                         or nil.
  784.     vRefNum        input:    Volume specification.
  785.     objType        input:    The mapping function code: 1 if you're mapping a
  786.                         user ID to a user name or 2 if you're mapping a
  787.                         group ID to a group name.
  788.     name        input:    Points to a buffer (minimum Str31) where the user
  789.                         or group name is to be returned or must be nil.
  790.                 output:    The user or group name.
  791.     
  792.     Result Codes
  793.         noErr                0        No error
  794.         fnfErr                -43        Unrecognizable owner or group name
  795.         paramErr            -50        Function not supported by volume
  796.     
  797.     __________
  798.     
  799.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  800.                 FSpSetDirAccess, HMapName
  801. */
  802.  
  803. /*****************************************************************************/
  804.  
  805. pascal    OSErr    HMapName(ConstStr255Param volName,
  806.                          short vRefNum,
  807.                          ConstStr255Param name,
  808.                          short objType,
  809.                          long *ugID);
  810. /*    ¶ Map a user or group name to a user or group ID.
  811.     The HMapName function determines the user or group ID if you know the
  812.     user or group name.
  813.     
  814.     volName        input:    A pointer to the name of a mounted volume
  815.                         or nil.
  816.     vRefNum        input:    Volume specification.
  817.     name        input:    The user or group name.
  818.     objType        input:    The mapping function code: 3 if you're mapping a
  819.                         user name to a user ID or 4 if you're mapping a
  820.                         group name to a group ID.
  821.     ugID        output:    The user or group ID.
  822.  
  823.     Result Codes
  824.         noErr                0        No error
  825.         fnfErr                -43        Unrecognizable owner or group name
  826.         paramErr            -50        Function not supported by volume
  827.     
  828.     __________
  829.     
  830.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  831.                 FSpSetDirAccess, HMapID
  832. */
  833.  
  834. /*****************************************************************************/
  835.  
  836. pascal    OSErr    HCopyFile(short srcVRefNum,
  837.                           long srcDirID,
  838.                           ConstStr255Param srcName,
  839.                           short dstVRefNum,
  840.                           long dstDirID,
  841.                           ConstStr255Param dstPathname,
  842.                           ConstStr255Param copyName);
  843. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  844.     The HCopyFile function duplicates a file and optionally to renames it.
  845.     The source and destination volumes must be on the same file server.
  846.     This function instructs the server to copy the file.
  847.     
  848.     srcVRefNum    input:    Source volume specification.
  849.     srcDirID    input:    Source directory ID.
  850.     srcName        input:    Source file name.
  851.     dstVRefNum    input:    Destination volume specification.
  852.     dstDirID    input:    Destination directory ID.
  853.     dstPathname    input:    Pointer to destination directory name, or
  854.                         nil when dstDirID specifies a directory.
  855.     copyName    input:    Points to the new file name if the file is to be
  856.                         renamed or nil if the file isn't to be renamed.
  857.     
  858.     Result Codes
  859.         noErr                0        No error
  860.         dskFulErr            -34        Destination volume is full
  861.         fnfErr                -43        Source file not found, or destination
  862.                                     directory does not exist
  863.         vLckdErr             -46        Destination volume is read-only
  864.         fBsyErr                 -47        The source or destination file could
  865.                                     not be opened with the correct access
  866.                                     modes
  867.         dupFNErr            -48        Destination file already exists
  868.         paramErr            -50        Function not supported by volume
  869.         wrgVolTypErr        -123    Function not supported by volume
  870.         afpAccessDenied        -5000    The user does not have the right to
  871.                                     read the source or write to the
  872.                                     destination
  873.         afpDenyConflict        -5006    The source or destination file could
  874.                                     not be opened with the correct access
  875.                                     modes
  876.         afpObjectTypeErr    -5025    Source is a directory
  877.     
  878.     __________
  879.     
  880.     Also see:    FSpCopyFile, FileCopy, FSpFileCopy
  881. */
  882.  
  883. /*****************************************************************************/
  884.  
  885. pascal    OSErr    FSpCopyFile(const FSSpec *srcSpec,
  886.                             const FSSpec *dstSpec,
  887.                             ConstStr255Param copyName);
  888. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  889.     The FSpCopyFile function duplicates a file and optionally to renames it.
  890.     The source and destination volumes must be on the same file server.
  891.     This function instructs the server to copy the file.
  892.     
  893.     srcSpec        input:    An FSSpec record specifying the source file.
  894.     dstSpec        input:    An FSSpec record specifying the destination
  895.                         directory.
  896.     copyName    input:    Points to the new file name if the file is to be
  897.                         renamed or nil if the file isn't to be renamed.
  898.     
  899.     Result Codes
  900.         noErr                0        No error
  901.         dskFulErr            -34        Destination volume is full
  902.         fnfErr                -43        Source file not found, or destination
  903.                                     directory does not exist
  904.         vLckdErr             -46        Destination volume is read-only
  905.         fBsyErr                 -47        The source or destination file could
  906.                                     not be opened with the correct access
  907.                                     modes
  908.         dupFNErr            -48        Destination file already exists
  909.         paramErr            -50        Function not supported by volume
  910.         wrgVolTypErr        -123    Function not supported by volume
  911.         afpAccessDenied        -5000    The user does not have the right to
  912.                                     read the source or write to the
  913.                                     destination
  914.         afpDenyConflict        -5006    The source or destination file could
  915.                                     not be opened with the correct access
  916.                                     modes
  917.         afpObjectTypeErr    -5025    Source is a directory
  918.     
  919.     __________
  920.     
  921.     Also see:    HCopyFile, FileCopy, FSpFileCopy
  922. */
  923.  
  924. /*****************************************************************************/
  925.  
  926. pascal    OSErr    HMoveRename(short vRefNum,
  927.                             long srcDirID,
  928.                             ConstStr255Param srcName,
  929.                             long dstDirID,
  930.                             ConstStr255Param dstpathName,
  931.                             ConstStr255Param copyName);
  932. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  933.     The HMoveRename function moves a file or directory and optionally
  934.     renames it. The source and destination locations must be on the same
  935.     shared volume.
  936.     
  937.     vRefNum        input:    Volume specification.
  938.     srcDirID    input:    Source directory ID.
  939.     srcName        input:    The source object name.
  940.     dstDirID    input:    Destination directory ID.
  941.     dstName        input:    Pointer to destination directory name, or
  942.                         nil when dstDirID specifies a directory.
  943.     copyName    input:    Points to the new name if the object is to be
  944.                         renamed or nil if the object isn't to be renamed.
  945.     
  946.     Result Codes
  947.         noErr                0        No error
  948.         fnfErr                -43        Source file or directory not found
  949.         fLckdErr            -45        File is locked
  950.         vLckdErr            -46        Destination volume is read-only
  951.         dupFNErr            -48        Destination already exists
  952.         paramErr            -50        Function not supported by volume
  953.         badMovErr            -122    Attempted to move directory into
  954.                                     offspring
  955.         afpAccessDenied        -5000    The user does not have the right to
  956.                                     move the file  or directory
  957.     
  958.     __________
  959.     
  960.     Also see:    FSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  961. */
  962.  
  963. /*****************************************************************************/
  964.  
  965. pascal    OSErr    FSpMoveRename(const FSSpec *srcSpec,
  966.                               const FSSpec *dstSpec,
  967.                               ConstStr255Param copyName);
  968. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  969.     The FSpMoveRename function moves a file or directory and optionally
  970.     renames it. The source and destination locations must be on the same
  971.     shared volume.
  972.     
  973.     srcSpec        input:    An FSSpec record specifying the source object.
  974.     dstSpec        input:    An FSSpec record specifying the destination
  975.                         directory.
  976.     copyName    input:    Points to the new name if the object is to be
  977.                         renamed or nil if the object isn't to be renamed.
  978.     
  979.     Result Codes
  980.         noErr                0        No error
  981.         fnfErr                -43        Source file or directory not found
  982.         fLckdErr            -45        File is locked
  983.         vLckdErr            -46        Destination volume is read-only
  984.         dupFNErr            -48        Destination already exists
  985.         paramErr            -50        Function not supported by volume
  986.         badMovErr            -122    Attempted to move directory into
  987.                                     offspring
  988.         afpAccessDenied        -5000    The user does not have the right to
  989.                                     move the file  or directory
  990.     
  991.     __________
  992.     
  993.     Also see:    HMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  994. */
  995.  
  996. /*****************************************************************************/
  997.  
  998. pascal    OSErr    GetVolMountInfoSize(ConstStr255Param volName,
  999.                                     short vRefNum,
  1000.                                     short *size);
  1001. /*    ¶ Get the size of a volume mounting information record.
  1002.     The GetVolMountInfoSize function determines the how much space the
  1003.     program needs to allocate for a volume mounting information record.
  1004.     
  1005.     volName        input:    A pointer to the name of a mounted volume
  1006.                         or nil.
  1007.     vRefNum        input:    Volume specification.
  1008.     size        output:    The space needed (in bytes) of the volume mounting
  1009.                         information record.
  1010.     
  1011.     Result Codes
  1012.         noErr                0        No error
  1013.         nsvErr                -35        Volume not found
  1014.         paramErr            -50        Parameter error
  1015.         extFSErr            -58        External file system error - no file
  1016.                                     system claimed this call.
  1017.  
  1018.     __________
  1019.     
  1020.     Also see:    GetVolMountInfo, VolumeMount BuildAFPVolMountInfo,
  1021.                 RetrieveAFPVolMountInfo
  1022. */
  1023.  
  1024. /*****************************************************************************/
  1025.  
  1026. pascal    OSErr    GetVolMountInfo(ConstStr255Param volName,
  1027.                                 short vRefNum,
  1028.                                 void *volMountInfo);
  1029. /*    ¶ Retrieve a volume mounting information record.
  1030.     The GetVolMountInfo function retrieves a volume mounting information
  1031.     record containing all the information needed to mount the volume,
  1032.     except for passwords.
  1033.     
  1034.     volName            input:    A pointer to the name of a mounted volume
  1035.                             or nil.
  1036.     vRefNum            input:    Volume specification.
  1037.     volMountInfo    output:    Points to a volume mounting information
  1038.                             record where the mounting information is to
  1039.                             be returned.
  1040.     
  1041.     Result Codes
  1042.         noErr                0        No error    
  1043.         nsvErr                -35        Volume not found    
  1044.         paramErr            -50        Parameter error    
  1045.         extFSErr            -58        External file system error - no file
  1046.                                     system claimed this call.
  1047.  
  1048.     __________
  1049.     
  1050.     Also see:    GetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,
  1051.                 RetrieveAFPVolMountInfo
  1052. */
  1053.  
  1054. /*****************************************************************************/
  1055.  
  1056. pascal    OSErr    VolumeMount(const void *volMountInfo,
  1057.                             short *vRefNum);
  1058. /*    ¶ Mount a volume using a volume mounting information record.
  1059.     The VolumeMount function mounts a volume using a volume mounting
  1060.     information record.
  1061.     
  1062.     volMountInfo    input:    Points to a volume mounting information record.
  1063.     vRefNum            output:    A volume reference number.
  1064.     
  1065.     Result Codes
  1066.         noErr                0        No error
  1067.         notOpenErr            -28        AppleTalk is not open
  1068.         nsvErr                -35        Volume not found
  1069.         paramErr            -50        Parameter error; typically, zone, server,
  1070.                                     and volume name combination is not valid
  1071.                                     or not complete, or the user name is not
  1072.                                     recognized
  1073.         extFSErr            -58        External file system error - no file
  1074.                                     system claimed this call.
  1075.         memFullErr            -108    Not enough memory to create a new volume
  1076.                                     control block for mounting the volume
  1077.         afpBadUAM            -5002    User authentication method is unknown
  1078.         afpBadVersNum        -5003    Workstation is using an AFP version that
  1079.                                     the server doesn’t recognize
  1080.         afpNoServer            -5016    Server is not responding
  1081.         afpUserNotAuth        -5023    User authentication failed (usually,
  1082.                                     password  is not correct)
  1083.         afpPwdExpired        -5042    Password has expired on server
  1084.         afpBadDirIDType        -5060    Not a fixed directory ID volume
  1085.         afpCantMountMoreSrvrs -5061    Maximum number of volumes has been
  1086.                                     mounted
  1087.         afpAlreadyMounted    -5062    Volume already mounted
  1088.         afpSameNodeErr        -5063    Attempt to log on to a server running
  1089.                                     on the same machine
  1090.  
  1091.     __________
  1092.     
  1093.     Also see:    GetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,
  1094.                 RetrieveAFPVolMountInfo
  1095. */
  1096.  
  1097. /*****************************************************************************/
  1098.  
  1099. pascal    OSErr    Share(short vRefNum,
  1100.                       long dirID,
  1101.                       ConstStr255Param name);
  1102. /*    ¶ Establish a local volume or directory as a share point.
  1103.     The Share function establishes a local volume or directory as a
  1104.     share point.
  1105.  
  1106.     vRefNum            input:    Volume specification.
  1107.     dirID            input:    Directory ID.
  1108.     name            input:    Pointer to directory name, or nil if dirID
  1109.                             specifies the directory.
  1110.     
  1111.     Result Codes
  1112.         noErr                0        No error    
  1113.         tmfoErr                -42        Too many share points    
  1114.         fnfErr                -43        File not found    
  1115.         dupFNErr            -48        Already a share point with this name    
  1116.         paramErr            -50        Function not supported by volume    
  1117.         dirNFErrdirNFErr    -120    Directory not found    
  1118.         afpAccessDenied        -5000    This directory cannot be shared    
  1119.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1120.         afpContainsSharedErr -5033    The directory contains a share point    
  1121.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1122.  
  1123.     __________
  1124.     
  1125.     Also see:    FSpShare, Unshare, FSpUnshare
  1126. */
  1127.  
  1128. /*****************************************************************************/
  1129.  
  1130. pascal    OSErr    FSpShare(const FSSpec *spec);
  1131. /*    ¶ Establish a local volume or directory as a share point.
  1132.     The FSpShare function establishes a local volume or directory as a
  1133.     share point.
  1134.  
  1135.     spec    input:    An FSSpec record specifying the share point.
  1136.     
  1137.     Result Codes
  1138.         noErr                0        No error    
  1139.         tmfoErr                -42        Too many share points    
  1140.         fnfErr                -43        File not found    
  1141.         dupFNErr            -48        Already a share point with this name    
  1142.         paramErr            -50        Function not supported by volume    
  1143.         dirNFErrdirNFErr    -120    Directory not found    
  1144.         afpAccessDenied        -5000    This directory cannot be shared    
  1145.         afpObjectTypeErr    -5025    Object was a file, not a directory    
  1146.         afpContainsSharedErr -5033    The directory contains a share point    
  1147.         afpInsideSharedErr    -5043    The directory is inside a shared directory    
  1148.  
  1149.     __________
  1150.     
  1151.     Also see:    Share, Unshare, FSpUnshare
  1152. */
  1153.  
  1154. /*****************************************************************************/
  1155.  
  1156. pascal    OSErr    Unshare(short vRefNum,
  1157.                         long dirID,
  1158.                         ConstStr255Param name);
  1159. /*    ¶ Remove a share point.
  1160.     The Unshare function removes a share point.
  1161.  
  1162.     vRefNum            input:    Volume specification.
  1163.     dirID            input:    Directory ID.
  1164.     name            input:    Pointer to directory name, or nil if dirID
  1165.                             specifies the directory.
  1166.     
  1167.     Result Codes
  1168.         noErr                0        No error    
  1169.         fnfErr                -43        File not found    
  1170.         paramErr            -50        Function not supported by volume    
  1171.         dirNFErrdirNFErr    -120    Directory not found    
  1172.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1173.                                     this directory is not a share point    
  1174.  
  1175.     __________
  1176.     
  1177.     Also see:    Share, FSpShare, FSpUnshare
  1178. */
  1179.  
  1180. /*****************************************************************************/
  1181.  
  1182. pascal    OSErr    FSpUnshare(const FSSpec *spec);
  1183. /*    ¶ Remove a share point.
  1184.     The FSpUnshare function removes a share point.
  1185.  
  1186.     spec    input:    An FSSpec record specifying the share point.
  1187.     
  1188.     Result Codes
  1189.         noErr                0        No error    
  1190.         fnfErr                -43        File not found    
  1191.         paramErr            -50        Function not supported by volume    
  1192.         dirNFErrdirNFErr    -120    Directory not found    
  1193.         afpObjectTypeErr    -5025    Object was a file, not a directory; or,
  1194.                                     this directory is not a share point    
  1195.  
  1196.     __________
  1197.     
  1198.     Also see:    Share, FSpShare, Unshare
  1199. */
  1200.  
  1201. /*****************************************************************************/
  1202.  
  1203. pascal    OSErr    GetUGEntry(short objType,
  1204.                            StringPtr objName,
  1205.                            long *objID);
  1206. /*    ¶ Retrieve a user or group entry from the local file server.
  1207.     The GetUGEntry function retrieves user or group entries from the
  1208.     local file server.
  1209.  
  1210.     objType        input:    The object type: -1 = group; 0 = user
  1211.     objName        input:    Points to a buffer (minimum Str31) where the user
  1212.                         or group name is to be returned or must be nil.
  1213.                 output:    The user or group name.
  1214.     objID        input:    O to get the first user or group. If the entry objID
  1215.                         last returned by GetUGEntry is passed, then user or
  1216.                         group whose alphabetically next in the list of entries
  1217.                         is returned.
  1218.                 output:    The user or group ID.
  1219.     
  1220.     Result Codes
  1221.         noErr                0        No error    
  1222.         fnfErr                -43        No more users or groups    
  1223.         paramErr            -50        Function not supported; or, ioObjID is
  1224.                                     negative    
  1225.  
  1226.     __________
  1227.     
  1228.     Also see:    GetUGEntries
  1229. */
  1230.  
  1231. /*****************************************************************************/
  1232.  
  1233. #ifdef __cplusplus
  1234. }
  1235. #endif
  1236.  
  1237. #include "OptimizationEnd.h"
  1238.  
  1239. #endif    /* __MOREFILES__ */
  1240.